
<template>
  <div class="container consume-list">
    <div class="nav">
      <van-nav-bar
        title="特惠门票购买"
        left-text=""
        left-arrow
        :z-index=99
        @click-left="routeToPath('')"
      />
    </div>
    <div class="swipe">
      <van-swipe :autoplay="3000" indicator-color="white">
        <van-swipe-item v-for="i in swipes">
          <img :src="i.img">
        </van-swipe-item>
      </van-swipe>
    </div>
    <h5>点击以下列表查看详情</h5>
    <div class="list">
      <ul>
        <li v-for="i in 5">
          <div class="pic">
            <img src="http://dummyimage.com/80x80/E6A23C/FFF&text=1">
          </div>
          <div class="info">
            <div class="title">
              圣淘金
            </div>
            <div class="subtitle">
              圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金
              圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金圣淘金
            </div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { Icon } from 'vant';
import { Swipe, SwipeItem } from 'vant';
import { NavBar } from 'vant';
export default {
  name: 'ConsumeList',
  data() {
    return {
      swipes: [{
        img: 'http://dummyimage.com/400x240/E6A23C/FFF&text=1',
      },{
        img: 'http://dummyimage.com/400x240/00405d/FFF&text=2',
      },{
        img: 'http://dummyimage.com/400x240/F56C6C/FFF&text=3',
      }]
    }
  },
  components: {
    [Icon.name]:Icon,
    [Swipe.name]:Swipe,
    [SwipeItem.name]:SwipeItem,
    [NavBar.name]:NavBar,
  },
  created() {

  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
h5{
  padding: .3rem 0;
  margin: 0 .4rem;
  margin-top: 0;
  color: #F56C6C;
  font-size: .42rem;
  border-bottom: 1px solid #eee;
}
.list{
  margin-bottom: 1rem;
  li{
    padding: .4rem;
    padding-bottom: 0;
    overflow: hidden;
    .pic{
      width: 20%;
      float: left;
      img{
        max-width: 100%;
        width: 100%;
        height: 100%;
      }
    }
    .info{
      float: left;
      width: 77%;
      margin-left: 3%;
      .title{
        padding-bottom: .1rem;
        font-size: .46rem;
        margin-bottom: .1rem;
      }
      .subtitle{
        color: #E8581B;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }
    }
  }
}
</style>

<style lang="scss">
.consume-list{
  .van-swipe__indicators{
    bottom: .4rem;
  }
}

</style>
